function request(options) {
	let promise = new Promise((resolve,reject)=>{
		uni.request({
			url:options.url,
			method:options.method||'GET',
			data:options.data||{},
			success:(res)=>{
				if(res.statusCode == 200){
					resolve(res)
				}else{
					reject(res)
				}
			},
			fail: (err) => {
				reject(err)
			}
		})
	})
	return promise;
}

export default{
	request:request
}